﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TangLiveRecorder
{
    public static class App
    {
        public static IServiceProvider ScopedProvider { get; internal set; }

        public static T GetRequiredService<T>() where T : notnull
        {
            return (T)ScopedProvider.GetRequiredService(typeof(T));
        }
    }
}